
public class LiczbaTest 
{
	
	public static void main(String[] args) 
	{
		int n;
		Liczba tmp;
		for (int i=0 ; i<args.length; i+=2)
		{
			try
			{
				n=Integer.parseInt(args[i+1]);
				tmp = new Liczba (args[i],n);
			}
			catch (NumberFormatException e)
			{
				System.out.println(args[i] + " " + args[i+1] + " niepoprawna para" );
				continue;
			}
			catch (LiczbaException e)
			{
				System.out.println(args[i] + " " + args[i+1] + " "+ e.getMessage() );
				continue;
			}
			for (int j=2;j<=16; j++)
				try
				{
					System.out.print(tmp.zapis(j) + " ");
				}
				catch (LiczbaException e)
				{
					System.out.println(e.getMessage());
				}
			System.out.println();
		}	
	}
}
